package com.luis.toolbox.outbound;

import com.luis.toolbox.inbound.Router;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.messaging.MessageHandler;

@Configuration
public class ConsoleProducer {

	private final Logger log = LoggerFactory.getLogger(ConsoleProducer.class);
	@Bean
	@ServiceActivator(inputChannel = "consoleOutboundChannel")
	public MessageHandler consoleOutbound() {
		return message -> log.info(message.getPayload().toString());
	}

}
